package com.msh.platform.elm.entity;

import javax.persistence.*;
import java.math.BigDecimal;
import java.util.Objects;

@Entity
@Table(name = "buyer_ord", schema = "mscm_dev", catalog = "")
public class BuyerOrd {
    private String id;
    private Integer buyerId;
    private Integer buyerAddrId;
    private String ordNo;
    private BigDecimal amount;
    private BigDecimal discount;
    private String status;
    private String payType;
    private String payAcctNo;
    private String ordRem;
    private String admRem;
    private String article;
    private String backArticle;
    private Integer createTime;

    @Id
    @Column(name = "ID")
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "buyer_id")
    public Integer getBuyerId() {
        return buyerId;
    }

    public void setBuyerId(Integer buyerId) {
        this.buyerId = buyerId;
    }

    @Basic
    @Column(name = "buyer_addr_id")
    public Integer getBuyerAddrId() {
        return buyerAddrId;
    }

    public void setBuyerAddrId(Integer buyerAddrId) {
        this.buyerAddrId = buyerAddrId;
    }

    @Basic
    @Column(name = "ord_no")
    public String getOrdNo() {
        return ordNo;
    }

    public void setOrdNo(String ordNo) {
        this.ordNo = ordNo;
    }

    @Basic
    @Column(name = "AMOUNT")
    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    @Basic
    @Column(name = "discount")
    public BigDecimal getDiscount() {
        return discount;
    }

    public void setDiscount(BigDecimal discount) {
        this.discount = discount;
    }

    @Basic
    @Column(name = "STATUS")
    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    @Basic
    @Column(name = "pay_type")
    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

    @Basic
    @Column(name = "pay_acct_no")
    public String getPayAcctNo() {
        return payAcctNo;
    }

    public void setPayAcctNo(String payAcctNo) {
        this.payAcctNo = payAcctNo;
    }

    @Basic
    @Column(name = "ord_rem")
    public String getOrdRem() {
        return ordRem;
    }

    public void setOrdRem(String ordRem) {
        this.ordRem = ordRem;
    }
    
    @Basic
    @Column(name = "adm_rem")
    public String getAdmRem() {
        return admRem;
    }

    public void setAdmRem(String admRem) {
        this.admRem = admRem;
    }
    
    @Basic
    @Column(name = "article")
    public String getArticle() {
        return article;
    }

    public void setArticle(String article) {
        this.article = article;
    }
    
    @Basic
    @Column(name = "back_article")
    public String getBackArticle() {
        return backArticle;
    }

    public void setBackArticle(String backArticle) {
        this.backArticle = backArticle;
    }

    @Basic
    @Column(name = "CREATE_TIME")
    public Integer getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Integer createTime) {
        this.createTime = createTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        BuyerOrd buyerOrd = (BuyerOrd) o;
        return Objects.equals(id, buyerOrd.id) &&
                Objects.equals(buyerId, buyerOrd.buyerId) &&
                Objects.equals(buyerAddrId, buyerOrd.buyerAddrId) &&
                Objects.equals(ordNo, buyerOrd.ordNo) &&
                Objects.equals(amount, buyerOrd.amount) &&
                Objects.equals(discount, buyerOrd.discount) &&
                Objects.equals(status, buyerOrd.status) &&
                Objects.equals(payType, buyerOrd.payType) &&
                Objects.equals(payAcctNo, buyerOrd.payAcctNo) &&
                Objects.equals(ordRem, buyerOrd.ordRem) &&
                Objects.equals(createTime, buyerOrd.createTime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, buyerId, buyerAddrId, ordNo, amount, discount, status, payType, payAcctNo, ordRem, createTime);
    }
}
